﻿using oueb;
using oueb.react;

namespace png2ico
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, PNG2ICO!");
            var oserve = new OuebServer("http://127.0.0.3:11003");
            oserve.UseCors(op => op.AllowAnyHeaders().AllowAnyMethod().AllowAnyOrigin());
            oserve.AddRoute("/png2ico", new Png2IcoModule());
            OuebReact.LoadWebPath(oserve, "www");

            oserve.Listen();
            Console.WriteLine("Now start http://127.0.0.3:11003");
            lock (oserve) while (oserve.Runing) Monitor.Wait(oserve, 1000);
            Console.WriteLine("Bye-");
        }
    }
}
